package com.smartEdu.dao.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import com.smartEdu.commons.CMap;
import com.smartEdu.dao.NewsDao;
import com.smartEdu.mapper.NewsMapper;
import com.smartEdu.model.NewsModel;

@Repository(value="newsDaoImpl")
public class NewsDaoImpl implements NewsDao{
	@Autowired(required=false)
	@Qualifier("newsMapper")
	private NewsMapper newsMapper;
	@Override
	public List<NewsModel> getNews(CMap map) {
		return newsMapper.getNews(map.getVals());
	}
	@Override
	public List<NewsModel> getNewsByNtype() {
		// TODO Auto-generated method stub
		return newsMapper.getNewsByNtype();
	}
}
